import java.awt.*;
import java.awt.event.*;
import java.util.*;
import java.util.List;
import javax.swing.*;

public class Mapframe extends JFrame implements ActionListener {
	private JButton nextscene;
	JLabel label;
	ImageIcon buttonimage = new ImageIcon("D:\\myeclipse\\Rpg1\\bin\\images\\5.jpg");
	ImageIcon backimage = new ImageIcon("D:\\myeclipse\\Rpg1\\bin\\images\\2.jpg");
	private static Toolkit tk = Toolkit.getDefaultToolkit();
	private static Image [] imags = {
			tk.getImage(Mapframe.class.getClassLoader().getResource("images/2.jpg")),
			
	};
	
/*	public void paint(Graphics g) {
		g.drawImage(imags[0], 0, 0, this);
	}*/
	
	Mapframe() {
		setLayout(null);
		label = new JLabel(backimage);
		label.setIcon(backimage);
		label.setBounds(0, 0, backimage.getIconWidth(), backimage.getIconHeight());
		add(label);
		nextscene = new JButton(buttonimage);
		nextscene.setBounds(400, 10, 100, 66);
		add(nextscene);
		nextscene.addActionListener(this);
		this.setBounds(30, 30, 907, 570);
		this.setVisible(true);
		
	}
	
	public void actionPerformed(ActionEvent e) {
		if (e.getSource() == nextscene) {
			Mapbranch firstmap = new Mapbranch();
			this.dispose();

		}
		
	}
	
	
	

}
